export const shortcutKey = {
  drawerToggle: {
    code: 'Tab',
    key: 'Tab',
    shiftKey: false,
    ctrlKey: false,
    altKey: false
  },
  copyNode: {
    code: 'KeyC',
    key: 'c',
    shiftKey: false,
    ctrlKey: true,
    altKey: false
  },
  pasteNode: {
    code: 'KeyV',
    key: 'v',
    shiftKey: false,
    ctrlKey: true,
    altKey: false
  },
  removeNode: {
    code: 'Delete',
    key: 'Delete',
    shiftKey: false,
    ctrlKey: false,
    altKey: false
  },
  undo: {
    code: 'KeyZ',
    key: 'z',
    shiftKey: false,
    ctrlKey: true,
    altKey: false
  },
  redo: {
    code: 'KeyY',
    key: 'y',
    shiftKey: false,
    ctrlKey: true,
    altKey: false
  },
  save: {
    code: 'KeyS',
    key: 's',
    shiftKey: false,
    ctrlKey: true,
    altKey: false
  }
}

export const getTip = (key) => {
  return `快捷键：${key.shiftKey ? 'Shift + ' : ''}${key.ctrlKey ? 'Ctrl + ' : ''}${key.altKey ? 'Alt + ' : ''}${key.key}`
}
